_.templateSettings = {
    interpolate: /\{\{(.+?)\}\}/g
};
var DataType = {
    parse: function(v) {
        return String(v);
    },
    trim: function(v) {
        return v.replace(/^\s+|\s+$/g, '');
    },
    '+': function(a, b) {
        return a + b;
    },
    /**
     * 模板替换
     * @example String.template('Hello {{name}}', 'world') ;//"Hello world"
     * @param {String} a
     * @param {String} b
     * @return {String}
     */
    'template': function(a, b) {
        var t = _.template(a);
        return t(b);
    }
};

module.exports = DataType;